﻿using GZNest.Entity.Spin.System;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GZNest.Entity.Spin.Biz
{
    public class ProductionOrderLine
    {
        [Key]
        public int OrderLineId { get; set; }
        public int OrderId { get; set; }

        public int MachineId { get; set; }


        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime? StartedDate { get; set; }

        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime EndDate { get; set; }

        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime? ExpectedEndDate { get; set; }

        public OrderLineStatus Status { get; set; }

        public virtual Machine Machine { get; set; }

        public virtual ProductionOrder ProductionOrder { get; set; }

    }

    public enum OrderLineStatus
    {
        Default = 0,
        InProgress,
        Completed
    }
}
